package com.repair.project.controller;


import com.repair.project.config.R;
import com.repair.project.entity.House;
import com.repair.project.entity.Typelist;
import com.repair.project.service.HouseService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hz
 * @since 2021-01-12
 */
@RestController
@RequestMapping("/project/house")
public class HouseController {

    @Autowired
    HouseService houseService;

    @ApiOperation("接口描述：获取所有宿舍房号")
    @GetMapping("getHouseList")
    public R getHouseList(){

        List<House> houselists =houseService.list(null);

        return R.ok().data("datalist",houselists);
    }
}

